<template>
 <div class="home">
    <el-carousel :interval="5000" type="card" height="500px" autoplay interval:2000>
    <el-carousel-item v-for="(item,index) in dataimg" :key="index">
      <img :src="item.url">
      
    </el-carousel-item>
  </el-carousel>
 </div>
</template>


<script>
export default {
  name: "home",
   
    data() {
        return {
          
          dataimg:[
              {
                url: 'https://img2.baidu.com/it/u=3995464703,3136922758&fm=15&fmt=auto&gp=0.jpg'
              },
              {
               url: 'https://img2.baidu.com/it/u=667520747,1795140450&fm=26&fmt=auto&gp=0.jpg'
              },
              {
               url: 'https://img0.baidu.com/it/u=2129071935,3359052160&fm=15&fmt=auto&gp=0.jpg'
              },
              {
                url: 'https://img1.baidu.com/it/u=1617967975,3874158652&fm=26&fmt=auto&gp=0.jpg'
              },
              {
                url:'https://img1.baidu.com/it/u=2328873778,1588952787&fm=26&fmt=auto&gp=0.jpg'
              }
          ]
           
          }
        },

        methods:{
        
          findLogin() {
            if (localStorage.getItem("loginUser")==null) {
              this.$message({
                type: 'warning',
                message:'登录可访问更多信息'
              })
            }
          }
        },
        mounted(){
          this.findLogin();
        }
    
}
</script>

<style>

</style>